package com.hongxun.design.listeners;

/**
 * Created by zerdoor_pc on 2016/5/9.
 */

import android.view.View;

import com.hongxun.design.MyApp;
import com.hongxun.design.activitys.SetPointInformationActivity;
import com.hongxun.design.bean.BitTypeTabItemBean;
import com.hongxun.design.mytools.IntentToActivity;
import com.hongxun.design.utils.DataUtil;

import java.util.Map;

/**
 * 点位设置界面点击跳转界面*
 */
public class bittypeitemclick implements View.OnClickListener {
    BitTypeTabItemBean Bitbean;

    public bittypeitemclick(BitTypeTabItemBean bean) {
        this.Bitbean = bean;

    }

    @Override
    public void onClick(View view) {
        if (MyApp.activity == null) return;
        MyApp.currExploration.setName(Bitbean.getName());
        MyApp.currExploration.setPt_type(Bitbean.getType());//点位属性、、特征点与定位点
        Map<String, Integer> map = DataUtil.getIconData(0);
        MyApp.currExploration.setIcon(Integer.parseInt(map.get(Bitbean.getId()).toString()));
        MyApp.currExploration.setPt_id(Bitbean.getId());
        //BitTypeTabItemBean//器材信息
        IntentToActivity.intent(MyApp.activity, SetPointInformationActivity.class);
        MyApp.activity.finish();
    }
}